home *** CD-ROM | disk | FTP | other *** search
- @if "%debug%"=="" echo off
- for %%i in (%tmp%\_halt.*) do if exist %%i del %%i
- if "%1"==":" if not "%2"=="" goto %2
- :: Halt Begin ::
-
- if "%1"=="" goto _clean
- for %%i in (yes YES yeS Yes yEs yES YeS YEs) do if "%1"=="%%i" goto _yes
- for %%i in (no NO No nO) do if "%1"=="%%i" goto _no
- if not exist %ramdrv%\etc\%1.txt goto _end
-
- :_start
- echo HALT >%ramdrv%\halt.txt
- echo HALT: %1
- echo :w_halt " NwDsk Halt " [x]>%tmp%\_halt.tmp
- if "%_nwdhlt%"=="" goto _not1me
- echo (%_nwdhlt% sec.)>>%tmp%\_halt.tmp
- goto _t1me
- :_not1me
- echo (%1)>>%tmp%\_halt.tmp
- :_t1me
- echo. >>%tmp%\_halt.tmp
- type %ramdrv%\etc\%1.txt >>%tmp%\_halt.tmp
- echo. >>%tmp%\_halt.tmp
- for %%i in (stop stoP stOp sTop Stop stOP sToP StoP sTOp StOp STop sTOP StOP SToP STOp STOP) do if "%1"=="%%i" goto _stop
- :_halt
- if "%_nwdhlt%"=="" goto _not2me
- echo [? Ok ] >>%tmp%\_halt.tmp
- call w.bat box @%tmp%\_halt.tmp:w_halt #1,%_nwdhlt%
- goto _reboot
- :_not2me
- echo [? Ok ] >>%tmp%\_halt.tmp
- call w.bat box @%tmp%\_halt.tmp:w_halt #1
- goto _reboot
- :_stop
- echo [ Ok ] [? Cancel ] >>%tmp%\_halt.tmp
- if "%_nwdhlt%"=="" goto _notime
- call w.bat box @%tmp%\_halt.tmp:w_halt #1,%_nwdhlt%
- if errorlevel 2 goto _semiend
- goto _reboot
- :_notime
- call w.bat box @%tmp%\_halt.tmp:w_halt #1
- if errorlevel 2 goto _semiend
- goto _reboot
-
- :_yes
- if "%macaddr8%"=="" goto _yes1
- if exist %srcdrv%\etc\%macaddr8%.yes goto _yes1
- if not exist %srcdrv%\etc\%macaddr8%.___ if not exist %srcdrv%\etc\%macaddr8%.no goto _yes2
- set t_out=1
- call drd.bat %srcdrv%
- if errorlevel 1 set t_out=0
- wbat box @%0:w_wprot #1,%t_out%
- set t_out=
- if errorlevel 2 goto _yes2
- if not exist %srcdrv%\etc\%macaddr8%.no goto _q11
- type %srcdrv%\etc\%macaddr8%.no >%srcdrv%\etc\%macaddr8%.yes
- del %srcdrv%\etc\%macaddr8%.no >%tmp%\nul
- if exist %srcdrv%\etc\%macaddr8%.no goto _yes3
- :_q11
- if not exist %srcdrv%\etc\%macaddr8%.___ goto _q12
- type %srcdrv%\etc\%macaddr8%.___ >%srcdrv%\etc\%macaddr8%.yes
- :_q12
- if not exist %srcdrv%\etc\%macaddr8%.yes goto _yes2
- echo HALT: Created %srcdrv%\etc\%macaddr8%.yes'
- goto _yes1
- :_yes2
- echo HALT: Could not create '%srcdrv%\etc\%macaddr8%.yes'
- goto _yes1
- :_yes3
- echo HALT: Could not delete '%srcdrv%\etc\%macaddr8%.no'
- goto _yes1
- :_yes1
-
- if "%ipaddr8%"=="" goto _yes1a
- if exist %srcdrv%\etc\%ipaddr8%.yes goto _yes1a
- if not exist %srcdrv%\etc\%ipaddr8%.___ if not exist %srcdrv%\etc\%ipaddr8%.no goto _yes2a
- set t_out=1
- call drd.bat %srcdrv%
- if errorlevel 1 set t_out=0
- wbat box @%0:w_wprot #1,%t_out%
- set t_out=
- if errorlevel 2 goto _yes2a
- if not exist %srcdrv%\etc\%ipaddr8%.no goto _q21
- type %srcdrv%\etc\%ipaddr8%.no >%srcdrv%\etc\%ipaddr8%.yes
- del %srcdrv%\etc\%ipaddr8%.no >%tmp%\nul
- if exist %srcdrv%\etc\%ipaddr8%.no goto _yes3a
- :_q21
- if not exist %srcdrv%\etc\%ipaddr8%.___ goto _q22
- type %srcdrv%\etc\%ipaddr8%.___ >%srcdrv%\etc\%ipaddr8%.yes
- :_q22
- if not exist %srcdrv%\etc\%ipaddr8%.yes goto _yes2a
- echo HALT: Created %srcdrv%\etc\%ipaddr8%.yes'
- goto _yes1a
- :_yes2a
- echo HALT: Could not create '%srcdrv%\etc\%ipaddr8%.yes'
- goto _yes1a
- :_yes3a
- echo HALT: Could not delete '%srcdrv%\etc\%ipaddr8%.no'
- goto _yes1a
- :_yes1a
- goto _end
-
- :_no
- if "%macaddr8%"=="" goto _no1
- if exist %srcdrv%\etc\%macaddr8%.no goto _no1
- if not exist %srcdrv%\etc\%macaddr8%.___ if not exist %srcdrv%\etc\%macaddr8%.yes goto _no2
- set t_out=1
- call drd.bat %srcdrv%
- if errorlevel 1 set t_out=0
- wbat box @%0:w_wprot #1,%t_out%
- set t_out=
- if errorlevel 2 goto _no2
- if not exist %srcdrv%\etc\%macaddr8%.yes goto _q31
- type %srcdrv%\etc\%macaddr8%.yes >%srcdrv%\etc\%macaddr8%.no
- del %srcdrv%\etc\%macaddr8%.yes >%tmp%\nul
- if exist %srcdrv%\etc\%macaddr8%.yes goto _no3
- :_q31
- if not exist %srcdrv%\etc\%macaddr8%.___ goto _q32
- type %srcdrv%\etc\%macaddr8%.___ >%srcdrv%\etc\%macaddr8%.no
- :_q32
- if not exist %srcdrv%\etc\%macaddr8%.no goto _no2
- echo HALT: Created %srcdrv%\etc\%macaddr8%.no'
- goto _no1
- :_no2
- echo HALT: Could not create '%srcdrv%\etc\%macaddr8%.no'
- goto _no1
- :_no3
- echo HALT: Could not delete '%srcdrv%\etc\%macaddr8%.yes'
- goto _no1
- :_no1
-
- if "%ipaddr8%"=="" goto _no1a
- if exist %srcdrv%\etc\%ipaddr8%.no goto _no1a
- if not exist %srcdrv%\etc\%ipaddr8%.___ if not exist %srcdrv%\etc\%ipaddr8%.yes goto _no2a
- set t_out=1
- call drd.bat %srcdrv%
- if errorlevel 1 set t_out=0
- wbat box @%0:w_wprot #1,%t_out%
- set t_out=
- if errorlevel 2 goto _no2a
- if not exist %srcdrv%\etc\%ipaddr8%.yes goto _q41
- type %srcdrv%\etc\%ipaddr8%.yes >%srcdrv%\etc\%ipaddr8%.yes
- del %srcdrv%\etc\%ipaddr8%.yes >%tmp%\nul
- if exist %srcdrv%\etc\%ipaddr8%.yes goto _no3a
- :_q41
- if not exist %srcdrv%\etc\%ipaddr8%.___ goto _q42
- type %srcdrv%\etc\%ipaddr8%.___ >%srcdrv%\etc\%ipaddr8%.no
- :_q42
- if not exist %srcdrv%\etc\%ipaddr8%.no goto _no2a
- echo HALT: Created %srcdrv%\etc\%ipaddr8%.no'
- goto _no1a
- :_no2a
- echo HALT: Could not create '%srcdrv%\etc\%ipaddr8%.no'
- goto _no1a
- :_no3a
- echo HALT: Could not delete '%srcdrv%\etc\%ipaddr8%.yes'
- goto _no1a
- :_no1a
- goto _end
-
- :_clean
- if "%macaddr8%"=="" goto _no11
- if not exist %srcdrv%\etc\%macaddr8%.* goto _no11
- set t_out=1
- call drd.bat %srcdrv%
- if errorlevel 1 set t_out=0
- wbat box @%0:w_wprot #1,%t_out%
- set t_out=
- if errorlevel 2 goto _no12
- for %%i in (%srcdrv%\etc\%macaddr8%.*) do if exist %%i del %%i
- if exist %srcdrv%\etc\%macaddr8%.* goto _no12
- echo HALT: Deleted '%srcdrv%\etc\%macaddr8%.*'
- goto _no11
- :_no12
- echo HALT: Could not delete '%srcdrv%\etc\%macaddr8%.*'
- :_no11
- if "%ipaddr8%"=="" goto _ne11
- if not exist %srcdrv%\etc\%ipaddr8%.* goto _ne11
- set t_out=1
- call drd.bat %srcdrv%
- if errorlevel 1 set t_out=0
- wbat box @%0:w_wprot #1,%t_out%
- set t_out=
- if errorlevel 2 goto _ne12
- for %%i in (%srcdrv%\etc\%ipaddr8%.*) do if exist %%i del %%i
- if exist %srcdrv%\etc\%ipaddr8%.* goto _ne12
- echo HALT: Deleted '%srcdrv%\etc\%ipaddr8%.*'
- goto _ne11
- :_ne12
- echo HALT: Could not delete '%srcdrv%\etc\%ipaddr8%.*'
- :_ne11
- goto _end
-
- :w_wprot "Disable write protection..." [x]
-
- If the disk in drive %srcdrv% is write
- protected, please disable the write
- protection now in order to save settings.
- You can re-enable write protection after
- saving.
-
- [ Ok ] [? Cancel ]
- ::
-
- :_semiend
- set wbat=
- set ?=
- for %%i in (%ramdrv%\halt.txt %tmp%\_halt.*) do if exist %%i del %%i
- el! 1
- goto _veryend
-
- :_reboot
- set wbat=
- set ?=
- for %%i in (%tmp%\_halt.*) do if exist %%i del %%i
- reboot /c
-
- :_end
- set wbat=
- set ?=
- for %%i in (%tmp%\_halt.*) do if exist %%i del %%i
- :_veryend
- :: Halt End ::
-